<?php
final class SQLStatements {

    const USER_INSERT = "INSERT INTO user(user_id, user_uid, user_user_name, user_mobile_number) VALUES(?, ?, ?, ?)";
    const USER_SELECT_BY_ID = "SELECT * FROM user WHERE user_id = ?";
    const USER_SELECT_BY_UID = "SELECT * FROM user WHERE user_uid = ?";
    const USER_UPDATE = "UPDATE user SET user_uid = ?, user_user_name = ?, user_mobile_number = ? WHERE user_id = ?";
    const USER_DELETE_BY_ID = "DELETE FROM user WHERE user_id = ?";
    const USER_COUNT_UID = "SELECT COUNT(user_uid) FROM user WHERE user_uid = ?";
    const USER_COUNT_USER_NAME = "SELECT COUNT(user_user_name) FROM user WHERE user_user_name = ?";

    const CONTACT_INSERT = "INSERT INTO contact(contact_id, contact_owner_id, contact_uid, contact_full_name, contact_mobile_number) VALUES(?, ?, ?, ?, ?)";
    const CONTACT_SELECT_BY_ID = "SELECT * FROM contact WHERE contact_id = ?";
    const CONTACT_SELECT_MANY_BY_OWNER_ID = "SELECT * FROM contact WHERE contact_owner_id = ?";
    const CONTACT_UPDATE = "UPDATE contact SET contact_owner_id = ?, contact_uid = ?, contact_full_name = ?, contact_mobile_number = ? WHERE contact_id = ?";
    const CONTACT_DELETE_BY_ID = "DELETE FROM contact WHERE contact_id = ?";

    const SMS_INSERT = "INSERT INTO sms(sms_id, sms_sender_id, sms_recipient_mobile_number, sms_recipient_name, sms_message, sms_last_modified_date, sms_sent_date, sms_status) VALUES(?, ?, ?, ?, ?, ?, ?, ?)";
    const SMS_SELECT_BY_ID = "SELECT * FROM sms WHERE sms_id = ?";
    const SMS_SELECT_MANY_BY_SENDER_ID = "SELECT * FROM sms WHERE sms_sender_id = ?";    
    const SMS_SELECT_MANY_BY_STATUS = "SELECT * FROM sms WHERE sms_status = ? AND sms_sender_id = ?";
    const SMS_UPDATE = "UPDATE sms SET sms_sender_id = ?, sms_recipient_mobile_number = ?, sms_recipient_name = ?, sms_message = ?, sms_last_modified_date = ?, sms_sent_date = ?, sms_status = ? WHERE sms_id = ?";
    const SMS_DELETE_BY_ID = "DELETE FROM sms WHERE sms_id = ?";

}
?>
